package com.bush.mall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;

import com.bush.mall.common.entity.Result;;
import com.bush.mall.product.entity.CategoryEntity;

import java.util.List;

/**
 * 商品三级分类
 * @author RUN
 * @date 2022-11-28
 */
public interface CategoryService extends IService<CategoryEntity> {

    public static final String BEAN_ID = "mall.categoryService";


    /**
     * 创建商品分类表单对象
     * @author RUN
     * @date 2022-11-30
     */
     Result saveCategory(CategoryEntity category);


    /**
     * 修改商品分类表单
     * @author RUN
     * @date 2022-12-01
     */
     Result updateCategory(CategoryEntity category);

    /**
     * 通过指定id删除商品分类
     * @author RUN
     * @date 2022-11-30
     */
     Result deleteCategory(Long id);

    /**
     * 树形查找分类列表
     * @return {@link Result}
     */
    Result tree();

    /**
     * 根据商品类别id查询
     * @param id id
     * @return {@link Result}
     */
    Result queryByCategoryId(Long id);


    /**
     * 通过指定ids批量删除商品分类
     * @param ids id
     * @return {@link Result}
     */
    Result deleteBatchCategory(List<Long> ids);

    /**
     * 获取指定id三层分类
     * @param id id
     * @return {@link Result}
     */
    Result three(Long id);

}

